<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
	<div id="div1" :title="age+'岁'" :style="style" :class="class_arr">
		<input type="text" v-model="name">{{name}}
		<br>
		<input type="text" v-model="n1">+
		<input type="text" v-model="n2">=
		{{sum()}}
	</div>
	
	<script type="text/javascript">
		let vm = new Vue({
			el:'#div1',
			data:{
				name:'blue',
				n1:0,
				n2:0
			},
			methods:{
				sum(){
					return parseInt(this.n1)+parseInt(this.n2)
				}
			}
		});
	</script>
</body>
</html>